package com.swinw.asumall.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 新用户注册VO
 */
@Data
public class UserRegisterVo {

    @NotEmpty(message = "注册用户，帐号不能为空")
    @Length(min = 6,max = 18,message = "用户帐号必须在6~18位之间")
    private String username;

    @NotEmpty(message = "用户密码不能为空")
    @Length(min = 6,max = 16,message = "密码必须在6~16位之间")
    private String password;

    @Pattern(regexp = "^1[3|4|5|7|8][0-9]{9}$",message = "手机号码格式不正确")
    private String mobile;

    @NotEmpty(message = "验证码不能为空")
    private String code;
}
